<?php
set_time_limit (0);
$localhost='127.0.0.1';
$port = 9000;
if (!($server = stream_socket_server("tcp://$localhost:$port", $err_num, $err_string))) {
	exit("ERROR: Failed to Open Server - {$err_num} - {$err_string}\n");
}
$client = stream_socket_accept($server, -1);
$command = fgets($client, 2048);
while($line = fgets($client, 2048)) {if (trim($line) === '') { break; }}
$request = explode(' ', $command);




                @fwrite($client,
"HTTP/1.1 200 OK
Server: Bare-Basic-PHP-WebServer
Content-Type: text/html

Thanks for the request!");
fclose($client);
fclose($server);